Apparatus for receiving packet stream

ABSTRACT

In the packet stream receiver, transport streams are sequentially input, discontinuity of continuity counters described in packet headers of transport stream packets in the stream is detected and a loss of a transport stream packet is determined. A terminator is added to part of NAL units extracted from a packet immediately before the transport stream packet is lost, and data on NAL units up to a NAL unit whose start code is detected is discarded after the start code of the NAL unit contained in the transport stream packet is detected and a terminator is added thereto. Thus, a packet stream receiver can obtain appropriate data even when part of packets is lost during transmission.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is based upon and claims the benefit of priority fromprior Japanese Patent Application No. 2005-085143, filed Mar. 24, 2005,the entire contents of which are incorporated herein by reference.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention relates to an apparatus for receiving packetstream, and particularly to a packet stream receiver capable ofreceiving a packet stream and making it to optimized data.

2. Description of the Related Art

An encoding/decoding technique for video medium such as a moving pictureand audio mediums has been increasingly developed in recent years. Thisis because moving pictures with high quality have been developed and theamount of information has increased, and further because a wired orradio network has been developed and a desire for transmitting pictureinformation through the network has been increased.

The encoding/decoding technique for moving picture requires highcompression efficiency, high quality in decoding, and good transmissionefficiency, because the moving picture has remarkably information size.There is a technique called H.264/AVC (Advanced video coding), which isrecognized as the international standard of the encoding/decodingtechnique for moving picture which satisfies these desires (hereinafter,simply denoted as H.264), and this encoding/decoding technique formoving picture is disclosed in, for example, for example, IEEETRANSACTION ON CIRCUIT AND SYSTEMS FOR VIDEO TECHNOLOGY, VOL. 13, No. 7,2003, “Overview of the H.264/AVC Video Coding Standard”, Thomas Wiegand.

Also in a mobile digital broadcasting of ISBT-T (Integrated ServiceDigital Broadcasting-Terrestrical), H.264/AVC (Advanced video coding)standard is employed for a moving picture encoding method, MPEG-2standard or AAC (Advanced-Audio-Coding) standard is also employed for anaudio encoding method. In the encoding methods, encoding stream ismultiplexed on packets of a transport stream (TS stream) and thetransport stream (TS stream) is transmitted. In such transport stream(TS stream) transmission, if an error occurs during transmission andpart of packets is lost, that is, if packet loss occurs, discontinuityoccurs in an elementary stream (ES stream) extracted from the transportstream (TS stream). Since a decoder at a reception side does not detecta discontinuity and continuously decodes the ES stream, video and audiodata is erroneously interpreted.

If the ES stream corresponds to H.264 stream, a picture quality isdegraded due to the erroneous interpretation. If the ES streamcorresponds to AAC stream, noise, i.e., abnormal noise is also produceddue to the erroneous interpretation.

As described above, the erroneous interpretation on the video or audiodata causes the video or audio data to generate erroneous decodedpicture or audio different from normal picture or audio inherent in thevideo or audio data so that a picture or audio quality is remarkablydegraded.

In general, the decoder can detect an occurrence of error, only when asyntax error is occurred. However, in a method of small redundancyencoding type, there is produced a large span between an errorgenerating point and an error detection point so that degrade of areproduction quality is relatively large.

Similarly, also in streaming using RTP (Real Time Protocol), there is asimilar problem that part of packets is lost and data is degraded due toan erroneous interpretation.

BRIEF SUMMARY OF THE INVENTION

An object of the present invention is to provide an apparatus forereceiving a packet stream, which can optimize a part of packet datareceived in packet even when packet or packets are lost duringtransmission.

According to the present invention, there is provided an apparatus forreceiving a transport packet. stream, comprising:

an input unit configured to sequentially inputs transport stream packetsconstituting the transport packet stream;

a determining unit configured to detect discontinuity of continuitycounters described in packet headers of the transport stream packets anddetermine a loss of a transport stream packet;

a termination processor configured to add a terminator to part of anelementary stream extracted from a transport stream packet immediatelybefore the transport stream packet is lost; and

a detection processor configured to detect a synchronize point of theelementary stream after adding the terminator, and discard data ofanother part of elementary stream between the terminator and thesynchronize point of the elementary steam.

Further, according to the present invention, there is provided anapparatus for receiving a RTP packet stream, comprising:

an input unit configured to sequentially input RTP packets each includedin the RTP packet stream and having a RTP packet header and a payload;

a discriminating unit configured to discriminate, from an identifiercontained in the payload, that the RTP packet is a segmentation unitpacket;

a determining unit configured to detect continuity of sequence numberscontained in the RTP packet header, and when the numbers arediscontinuous and the identifier is a segmentation unit packet,determines that the RTP packet is lost;

a termination processor configured to add terminators to a part ofelementary stream extracted from a packet immediately before the lossRTP packet; and

a detection processor configured to detect a synchronize point of theelementary stream after adding the terminator, and discards data of ananother part of the elementary stream between the terminator and thesynchronize point of the elementary steam.

BRIEF DESCRIPTION OF THE SEVERAL VIEWS OF THE DRAWING

FIG. 1 is a block diagram schematically showing a reproducing apparatusfor receiving and decoding a transport stream according to oneembodiment of the present invention;

FIG. 2 is a schematic diagram showing a data structure of a transportstream (TS) to be transmitted to the apparatus shown in FIG. 1;

FIG. 3 is a schematic diagram showing a structure of a packetlizedelementary stream (PES) which is generated from packets of the transportstream shown in FIG. 2;

FIG. 4 is schematic diagrams showing a relationship between thetransport stream shown in FIG. 2, the packetlized elementary stream(PES) shown in FIG. 3, and a H.264 byte stream;

FIG. 5 is a schematic diagram showing a packet header and a H.264 bytestream in a co-existing manner for explaining a case where a packet islost in a transport stream (TS) to be transmitted to the apparatus shownin FIG. 1, and a schematic diagram showing a byte stream to betransmitted to a decoder, respectively;

FIG. 6 is a flow chart showing a processing of transport stream in adata processor shown in FIG. 1; and

FIG. 7 is a schematic diagram showing RTP (Real Time Protocol) streamingto be transmitted to the apparatus shown in FIG. 1 and a schematicdiagram showing a byte stream to be transmitted to the decoder,respectively.

DETAILED DESCRIPTION OF THE INVENTION

Hereinafter, an apparatus for receiving a packet stream and optimizingdata transmitted in this packet stream according to one embodiment ofthe present invention will be described with reference to the drawings.

FIG. 1 is a block diagram showing an apparatus which receives atransport stream and reproduces picture and audio data transmitted bythis transport stream (TS) according to one embodiment of the presentinvention. FIG. 2 shows the structure of this transport stream receivedin the apparatus shown in FIG. 1, FIG. 3 shows the structure of apacketized elementary stream (PES) constituted of the TS packetsextracted from the transport stream shown in FIG. 2, and FIG. 4 shows arelationship among the TS packets shown in FIG. 2, the PES packet shownin FIG. 3, and a byte stream prescribed by H.264/AVC.

The structure of the apparatus, i.e., receiver will be described withreference to FIG. 1, and the data structure of a transport stream willbe described with reference to FIG. 2 to FIG. 4.

In the apparatus shown in FIG. 1, a transport stream prescribed in MPEG2is transmitted from a transmitting unit (not shown) and this transportstream is received in a receiving unit 110. The transport stream (TS) isconstituted of a collection of TS packets 12 each having 188 bytes asshown in FIG. 2(A), and the TS packets 12 are sequentially input intothe receiving unit 110. Each TS packet 12 is constituted of a TS packetheader 14 having 4 bytes, an adaptation field 50 having a variablelength byte of 0 to 184 bytes, and TS packet data (payload) 16 havingremaining bytes as shown in FIG. 2(B). This TS packet 12 is transmittedto a data processor 102 shown in FIG. 1 and the TS packet header 14thereof is extracted and a packetlized elementary stream (PES) isconstituted of the TS packet data (payload) 16.

As shown in FIG. 2(C), a synchronization byte (sync byte) 18 where asynchronization signal having 8 bits is described as prescribed inMPEG2, a transport error indicator 20 which indicates the presence of abit error in the packet, and a payload unit start indicator 22 whichindicates that the PES packet shown in FIG. 4(C) starts from the payloadindicating the TS packet data 16 are described in the TS packet header14. The synchronization byte (sync byte) 18 is detected in the dataprocessor 102 so that a header of the transport stream packet (TS) 12 isdetected. The payload unit start indicator 22 is detected so that thedata processor 102 can extract the payload constituting the PES packet,that is, the TS packet data 16. Further, the transport error indicator20 is detected, thereby detecting, at the reception side, that an errorhas been occurred into the transport stream packet (TS) 16 duringtransmission.

The TS packet header 14 is constituted of a transport priority 24 whichindicates the degree of importance of the packet, a PID (PacketIdentification: packet identifier) 26 which indicates an attribute of anindividual stream of the packet, a transport scrambling control 28 whichindicates the presence of scramble of the packet and a type thereof, anadaptation field control 30 which indicates the presence of adaptationfield and the presence of payload, and a continuity counter 32 whichindicates information for detecting whether or not part of packetshaving the same PID is lost during transmission. The data processor 102can detect, in the PID (Packet Identification: packet identifier) 26,the payload of the TS packet 12, that is, whether the TS packet data isvideo or audio, and can specify the attribute of the PES packetconstituted of the TS packets 12. The data processor 12 can verify acount value indicated by the continuity counter 32 to discriminatewhether or not the TS packet 12 has been lost during transmission asdescribed later in detail. Here, in the continuity counter 32, the TSpackets 12 having the same PID have added thereto count values (0, 1, 2,. . ., F, 0, 1, 2) cycling in TS packet generating order.

The TS packet data (payload) 16 shown in FIG. 2(B) constitutes thepacketlized elementary stream (PES) for each medium, i.e., a videopacketlized elementary stream or an audio packetlized elementary stream,as shown in FIG. 3(B) or FIG. 3(F), and constitutes PES packet 40, 42shown in FIG. 3(B) or FIG. 3(F) each time the payload unit startindicator 22 is detected. In other words, the PES packet 40, 42 isconstituted of one or several TS packets 12 as shown in FIG. 3(C), FIG.3(D) and FIG. 3(E), and the packetized elementary stream (PES) isconstituted such that several PES packets 40 are sequentially arranged,and one PES packet 40, 42 is constituted of the TS packets 12 from theTS packet 12 including the payload unit start indicator 22 to the TSpacket 12 precedent to the TS packet 12 including the next payload unitstart indicator 22. The packetlized elementary stream (PES) isconstituted by multiplexing the PES packet 40 whose payload is videodata and the PES packet 42 whose payload is audio data. The dataprocessor 102 supplies the video PES packet 40 and the audio PES packet42 both of which are constituted of the TS packet data 16 according tothe payload unit start indicator 22 to a demultiplexer 103 (DEMUX).Here, the PES packets 41 and 42 are fixed in variable byte.

As shown in FIG. 3(A) and FIG. 3(B), the video PES packet 40 isconstituted of one or several access units (AU) 46 as payloadsubsequently to a PES header 44, and these access units (AU) 46constitute a byte stream prescribed in H/264, MPE-2, or MPEG-4. As shownin FIG. 3(F) and FIG. 3(G), the audio PES packet 42 is similarlyconstituted of one or several access units (AU) 48 as audio payloadsubsequently to the PES header 44. This audio payload stores audio dataencoded by various encoding schemes, that is, AC3 audio data, PCM audiodata, and MPEG audio data therein. A stream ID as an attributeidentifier which indicates that the payload of the PES packet 40 isaudio or video is described in the PES header 44, which enables todiscriminate the PES packet 40.

The demultiplexer 103 (DEMUX) supplies the audio payload to the audiodecoder 114 in accordance with the PID (Packet Identification: packetidentifier) 26, and supplies the access unit (AU) 46 to the H.264 videodecoder 111. Therefore, in the H.264 video decoder 111, NALs in theaccess unit (AU) 46 are decoded into a picture to be output as a videosignal for each frame in units of the access unit (AU) 46. Similarly, inthe audio decoder 114, the audio payload is decoded to be output as anaudio signal according to the audio payload encoding method.

The data processor 102, the demultiplexer 103, the video decoder 111,and the audio decoder 114 shown in FIG. 1 are controlled by a MPU 121and a memory 122 according to a processing program stored in a ROM 123.A key input unit 131 as a user interface is connected to the MPU 121 sothat video and audio reproduction can be controlled also according tothe input from the key input unit 131.

As described above, the transport stream TS is constituted ofconsecutive TS packets 16 as shown in FIG. 4(A), and each packet 40 isconstituted of the TS header 14 and the TS payload 16 as shown in FIG.4(B). One or several TS packets 16 constituting the PES packet 40 storethe PES header 44 and several AUs 46 in the payload thereof as shown inFIG. 4(B). One PES packet 40 is constituted of one or several TS packets16 each having 188 bytes, and is provided with an adaptation field 50 tobe data-aligned as needed such that one or several AUs 46 are containedtherein.

In the data processor 102, the TS header 14 is removed from one orseveral TS packets 16 as shown in FIG. 4(C) to constitute the PES packet40. The example in FIG. 4(C) shows that two of AUs 46 is stored in thepayload 46 of one PES packet 40 and the two of AUs 46 are extracted fromfour TS packets 16. Since the adaptation field 50 is inserted into theTS packet 16 for data alignment, it is discarded when constituting thePES packet 40.

In the demultiplexer 103, the PES header 44 in the PES packet 40 isremoved and the AUs 46 are sequentially transmitted to the video decoder111 and are decoded. FIG. 4(D) shows a byte stream which is constitutedof the AUs 46 extracted from the PES packets 40 and decoded in the videodecoder 111. In the video decoder 111, a start code (SC) 62 whichcorresponds to a synchronizing point in the AU is detected to extractNAL units 66 constituting the AU 46 as shown in FIG. 4(E), and a pictureconstituted in units of the AU 46, for example, a picture frame isgenerated from this NAL units 66. In H.264, macro blocks are constitutedaccording to information of several NAL units 66 and one picture isdisplayed.

Next, an operation of the receiver shown in FIG. 1 will be describedwith reference to FIG. 5, if a TS packet is lost while transmitting thetransport stream TS which corresponds to multiplexed H.264 streams.

As is clear from FIG. 4(B) and FIG. 4(C), one AU 46 or part of AU 46 isstored in one TS packet 16 stores therein as the payload 46 and one orseveral NAL units 66 and part of the NAL units 66 corresponding to theAUs 46. Therefore, when one TS packet 16 is lost while transmitting thetransport stream TS, one or several NAL units 66 and/or part of the NALunits 66 would be lost. Alternatively, the start code (SC) 62corresponding to the lost NAL unit may be also lost. When this TS packet16 is lost, only part of the NAL units 16 remains in correspondence tothe lost TS packet 16, and other part are lost, and part of the NALunits succeeding to this NAL unit 66 would be similarly lost and otherpart would be lost. When the NAL units 16 are sequentially supplied tothe H.264 video decoder 111, part of the NAL units 16 in a byte streamis coupled to the remaining of other NAL units 16 in the H.264 videodecoder 111. Since the H.264 video decoder 111 can not detect adiscontinuous point coupling the part of the NAL units 16 to theremaining of other NAL units 16, the H.264 video decoder Ill erroneouslyinterprets the data of the coupled NAL units to reproduce an picture sothat noise is appears in the picture due to an error.

FIG. 5(A) shows a data structure for conveniently explaining one examplewhere the TS packet 16 is lost while transmitting the transport stream(TS). As shown in FIG. 5(A), the transport error indicator 20 of the TSheader 14 is detected in the data processor 102, thereby determiningwhether or not an error is occurred in the TS packet 16. In FIG. 5, whenan error is occurred in the TS packet 16, “Err” is indicated in the TSpacket header 14, and when an error is not occurred in the TS packet 16,“Free” is indicated in the TS packet header 14. The continuity counter32 of the TS packet header 14 describes therein counter values (0×0,0×1, 0×2, . . .) which are updated in TS packet transmitting order.

When the receiving unit 110 starts to receive the transport stream 16 ata certain timing and a certain transport stream packet 16-1 istransmitted to the data processor 102, the data processor 102 detects.“Free” indicating that an error is not occurred from the transport errorindicator 20 of the header 14 of the transport stream packet 16-1 andthe count value “0×0” from the continuity counter 32. When part of theNAL unit (1) 66 and the NAL unit (2) 66 has been transmitted to thetransport stream packet 16-1, part of the NAL unit (1) 66 and the NALunit (2) 16 is transmitted to the video decoder 111 via thedemultiplexer 103. When packet loss has occurred in the transport streampacket 16-2 in the transport stream (TS) during transmission, the nexttransport stream packet 16-2 is not received in the receiving unit 110and the further next transport stream packet 16-3 is input into thereceiving unit 110. When the remaining of the NAL unit (2) 66 and partof the NAL units (3) are stored in the packet loss transport streampacket 16-2, the remaining of the NAL unit (2) 66 and the NAL unit (3)66 would be lost during transmission. When the transport stream packet16-3 is transmitted to the data processor 102, the data processor 102detects the count value “0×2” from the continuity counter 32. Therefore,since the data processor 102 detects not the count value “0×1” but thecount value “0×2”, the data processor 102 detects that the transportstream packet 16-2 has been lost during transmission. Thus, since anerror occurs when the remaining of the NAL unit (3) 66 at the start ofthe transport stream packet 16-3 is transmitted to the video decoder 111via the demultiplexer 103, a processing of discarding the remaining ofthis NAL unit (3) 66 is performed. When the remaining of the NAL unit(2) 66 is transmitted to the vide decoder 111 as shown in FIG. 5(B)along with the discarding of the remaining of this NAL unit (3) 66, datain the remaining of the NAL unit (2) 66 may be so treated that theremaining data is terminated at byte unit, a terminator “0×80”indicating the termination of the NAL unit may be inserted subsequentlyto part of the NAL unit (2) 66, and may be transmitted to the videdecoder 111. Therefore, the vide decoder 111 forms a picture with thealready input other NAL units 66 and the remaining of the NAL unit (1)66 and the NAL unit (2) 66. Thus, as one example, a display unit (notshown) displays that macro blocks of the picture frame looks lost.Further, the display unit (not shown) displays a picture where a normalmacro blocks and a replaced macro blocks are combined, where lost macroblocks is replaced with other approximated macro blocks already decoded.

The NAL unit (3) 66 precedent to the discarded NAL unit (3) 66 in thetransport stream packet 16-3 is detected at the star code (SC) of theheader thereof and is transmitted to the video decoder 111.

A transport stream processing shown in FIG. 5(A) and FIG. 5(B) will bedescribed in more detail with reference to FIG. 6. When the processingis started as shown in step S10, the data processor 102 confirms whetheror not an operation of detecting the start code (SC) 62 is ON. In stepS12, an OFF operation of not detecting the start code (SC) 62 is set, instep S14, it is confirmed whether or not the values of the continuitycounter (CC) 32 are continuous in the transport stream (TS). Forexample, it is conformed that the count value has been updated from thecount value (0×4) to the count value (0×5) in the TS packets 16-5 and16-6 as shown in FIG. 5(A). When the count values (0×0, 0×1, 0×2, . . .)are continuous, it is determined that packet loss has not occurred, andthe processing of corresponding all the data of the transport stream(TS) to the transport stream (TS) in the video decoder is terminated asshown in step S16.

In step S12, when the operation of detecting the start code (SC) 62 isON, in step S22, the presence of the start code (SC) 62 is confirmed.When the start code (SC) is not detected, in step S30, all the data ofthe transport stream (TS) is discarded. As shown in step S32, it isdetermined that the values of the continuity counter (CC) 32 arediscontinuous and the start code (SC) 62 is not present, and theprocessing is terminated for the transport stream (TS) while theoperation of detecting the start code (SC) 62 is being ON so that theprocessing of the next transport stream (TS) is waited.

In step S14, when the start code (SC) 62 is discontinuous, in step S20,it is confirmed that an error is not present in this TS packet 16 andthe TS packet 16 immediately before this TS packet 16. Specifically, itis confirmed that “Free” is described in the transport error indicators20 of this TS packet 16 and the TS packet 16 immediately before this TSpacket. When “Free” is not described in the transport error indicator 20and the “Err” is described in one of this TS packet 16 and the TS packet16 immediately before this TS packet 16, the values of the continuitycounter (CC) 32 are not reliable and the processing for packet losscannot be performed. Therefore, all the data of the transport stream(TS) is transferred to perform the picture display processing while theprocessing for packet loss is not performed, and the processing proceedsto the processing for the next transport stream (TS) while theprocessing of detecting the start code (SC) is being OFF. In step S20,the case of No corresponds to the processing in the case of transitionfrom the TS packet 16-3 to the TS packet 16-4, the case of transitionfrom the TS packet 16-4 to the TS packet 16-5, or the case of transitionfrom the TS packet 16-5 to the TS packet 16-6.

In step S20, when it is confirmed that “Free” is described in thetransport error indicators 20 of this TS packet 16 and the TS packet 16immediately before this TS packet, the processing proceeds to step S22.Though “Free” is described in both the transport error indicators 20 ofthe TS packets 16-1 and 16-3 and packet loss of the TS packet 16-2occurs there between, since the TS packets 16-1 and 16-3 arecontinuously input into the data processor 102, this fact corresponds toYES in step S20. In step S22, it is confirmed, as described above,whether or not the start code (SC) is present. When the start code (SC)is present, the termination processing of inserting the terminator“0×80” indicating the termination of the NAL unit into part of the NALunit (2) 66 is performed as shown in step S24, and the remaining of theNAL unit (3) is discarded and the next start code (SC) is detected tosupply the NAL unit (4) starting with this start code (SC) to thedecoder 111 as shown in step S26. Thereafter, the detection of the startcode (SC) is made OFF and the processing returns to step S12 again.

In the above explanation, there is configured a picture of NAL unitsafter the start code which is detected by discarding the data up to thenext start code in step S26 after the data termination is aligned instep S24. However, there may be configured a picture utilizing NAL unithaving no error in the NAL type and NILL units succeeding thereto bydiscarding the data of the NAL units up to the start code having noerror in the NAL type contained in the NAL unit. When the NAL unithaving the start code to be detected next is a filler NAL unit, data onthis filler NAL unit is discarded so that a picture may be configured byutilizing the NAL units other than the filler NAL unit and the NAL unitssucceeding thereto. Further, when the NAL unit whose start code isdetected next does not follow the random access point in step S26, apicture may not be configured until the NAL units are sequentiallydiscarded and the NAL units constituting IDR-AU (Instantaneous DecodingRefresh Access Unit) are detected. The NAL unit including IDR(Instantaneous Decoding Refresh) is a randomly accessible NAL unit andthis NAL unit can be used to display a completed picture so that a flag“1” is described in the random access indicator described in theadaptation field control 30 shown in FIG. 2(C). Thus, the TS headers aresequentially retrieved to confirm the adaptation field control 30 sothat the NAL unit including IDR (Instantaneous Decoding Refresh) can beretrieved.

As described above, in the transport receiver according to oneembodiment of the present invention, the demultiplexer (DEMUX) extractsthe 4-bit continuity counter provided in the transport stream header inthe transport stream (TS stream) to detect the start code (0×000001),and transfers the data succeeding to the start code (0×000001) to thevideo decoder. Thus, the continuity point of the data is always thestart code (0×000001), and decoding can be performed without erroneousinterpretation of discontinuous data. As a result, a relatively normalreproduction picture can be obtained without degraded picture qualitywhich is produced on the erroneous interpretation.

In the above described embodiment, the transport stream corresponding tothe multiplexed H.264 streams are described. However, this invention isnot limited to the transport stream corresponding to the multiplexedH.264 streams, but also applies to the other packet stream whichconstitutes an elementary stream including encoding data and synchronouspoints and can be apply to various encoding method and various medium tobe encoded.

As described above, it is possible to detect packet loss in thetransport stream and to reproduce an appropriate reproduced picture, butthe present invention is not limited to the transport stream and can besimilarly applied to streaming transmission using RTP (Real TimeProtocol). Detection of packet loss in the streaming transmission usingRTP (Real Time Protocol) will be described with reference to FIG. 7.

In the streaming using RTP (Real time Protocol), RTP packets 70-1 to70-4 are sequentially supplied to the receiving unit 110 as shown inFIG. 7(A). The RTP packet includes single NAL unit packet, aggregationpacket, and fragmentation unit packet. An identifier for identifying thepacket is described in a payload header 74 succeeding to a RTP packetheader 72. Only one NAL unit is stored in the single NAL unit packet,several NAL units are stored in the aggregation packet, and part of NALunit is stored in the fragmentation unit packet. Further, the single NALunit packet and aggregation packet, and the NAL units therein aresynchronized with each other. Therefore, even when the signal NAL unitpacket or aggregation packet is lost during transmission, the NAL unitsare sequentially synchronized and supplied to the decoder 111 to bedecoded. On the contrary, when the fragmentation unit packet is lost,the sequence numbers of the RTP headers are detected in step S14 in theprocessing similar to in FIG. 6, and when the numbers are discontinuous,it is determined that a packet has been lost. When a packet loss ispresent, the termination processing is performed for part of NAL unitsof the previous packet transmitted before the loss packet, and theterminator “0×80” is inserted therein similar as in step S24.

When the RTP packet 70-1 is input and the fragmentation unit packet isdetected from the payload header 74 as shown in FIG. 7(A), it isconfirmed whether or not the sequence numbers (“0×0”, “0×1”) arecontinuous. When the numbers are continuous, part of the NAL unit (1) istransmitted to the decoder 111. Since, when the RTP packet 70-3 is lostas shown in FIG. 7(A), the numbers are discontinuous from the sequencenumber (“0×1”) to the sequence number (“0×3”), it is detected that theRTP packet 70-3 is lost. In this case, in the byte stream shown in FIG.7(B), part of NAL unit (1) of RTP packets 70-1 and 7-2 transferredbefore the loss RTP packet 70-3 are supplied to the decoder 111, andremaining of NAL unit (1) of the RTP packet 70-4 after the loss RTPpacket 70-3 is discarded and does not be supplied to the decoder 111. Inthis case, the terminator “0×080” may be inserted into the terminationof part of the NAL unit (1) of the RTP packet 70-2 before the loss RTPpacket 70-3 and is supplied to the decoder 111.

Therefore, the decoder 111 constitutes a picture with part of the NALunit (1) supplied with no discontinuous point and displays a relativelynormal reproduction picture without degraded picture quality which isproduced on the erroneous interpretation.

As described above, the stream receiver according to the presentinvention can transfer the elementary stream having substantially nodiscontinuous data to the decoded even when part of packets is lostduring transport stream transmission or in streaming using other RTP(Real Time Protocol).

1. An apparatus for receiving a transport packet stream, comprising: aninput unit configured to sequentially inputs transport stream packetsconstituting the transport packet stream; a determining unit configuredto detect discontinuity of continuity counters described in packetheaders of the transport stream packets and determine a loss of atransport stream packet; a termination processor configured to add aterminator to part of an elementary stream extracted from a transportstream packet immediately before the transport stream packet is lost;and a detection processor configured to detect a synchronize point ofthe elementary stream after adding the terminator, and discard data ofanother part of elementary stream between the terminator and thesynchronize point of the elementary steam.
 2. An apparatus according toclaim 1, further comprising a video decoder configured to utilize thepart of the elementary stream having the terminators to constitute apicture.
 3. An apparatus according to claim 1, wherein a header of thetransport stream packet includes an error indicator which indicateswhether or not an error is contained in the transport stream packet andthe termination processor adds the terminators to part of the elementarystream if the error indicator indicates error absence.
 4. An apparatusaccording to claim 1, wherein the detection processor discards theanther part of the elementary stream which includes no synchronizepoint.
 5. An apparatus according to claim 1, wherein, when the values ofthe continuity counters are discontinuous and the error indicatorindicates error presence, the detection processor determines that anerror is contained in the values of the continuity counters, andtransfers the elementary stream contained in the transport streampacket.
 6. An apparatus according to claim 3, wherein, when the errorindicator indicates error absence, the detection processor transfers theelementary stream contained in the transport stream packet.
 7. Anapparatus for receiving a RTP packet stream, comprising: an input unitconfigured to sequentially input RTP packets each included in the RTPpacket stream and having a RTP packet header and a payload; adiscriminating unit configured to discriminate, from an identifiercontained in the payload, that the RTP packet is a segmentation unitpacket; a determining unit configured to detect continuity of sequencenumbers contained in the RTP packet header, and when the numbers arediscontinuous and the identifier is a segmentation unit packet,determines that the RTP packet is lost; a termination processorconfigured to add terminators to a part of elementary stream extractedfrom a packet immediately before the loss RTP packet; and a detectionprocessor configured to detect a synchronize point of the elementarystream after adding the terminator, and discards data of another part ofthe elementary stream between the terminator and the synchronize pointof the elementary steam.
 8. A packet stream receiver according to claim7, further comprising a video decoder configured to utilized the part ofelementary stream having the terminator to constitute a picture.